﻿using System.Collections.Generic;
using System.Drawing;

namespace CoreShop.App
{
    public class MenuItemInfo
    {
        /// <summary>
        /// 行号
        /// </summary>
        public string RowId { get; set; }

        /// <summary>
        /// 条码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 菜名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public string Count { get; set; }

        /// <summary>
        /// 打折前金额
        /// </summary>
        public string Discounts { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public string Price { get; set; }

        /// <summary>
        /// 实价
        /// </summary>
        public string RealPrice { get; set; }

        /// <summary>
        /// 实收金额
        /// </summary>
        public string Money { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string UnitName { get; set; }

        /// <summary>
        /// 显示赠送图标
        /// </summary>
        public bool IsPresent { get; set; }

        /// <summary>
        /// 显示退菜图标
        /// </summary>
        public bool IsReturning { get; set; }

        /// <summary>
        /// 商品标签
        /// </summary>
        public readonly List<string> Tags = new List<string>();

        public Color ForeColor { get; set; } = Color.Black;

        public MenuItemInfo()
        {
            RowId = "";
            Code = string.Empty;
            Name = "";
            Count = "";
            Discounts = "";
            Money = "";
            Price = string.Empty;
            RealPrice = string.Empty;
            IsPresent = false;
        }

        public void AddTag(string tag)
        {
            Tags.Add(tag);
        }

        public void ClearTags()
        {
            Tags.Clear();
        }
    }
}
